export { }

interface Girl {
    name: string
}

class SelectGirl<T extends Girl> {
    constructor(private girls: T[]) { }
    getGirl(index: number): string {
        return this.girls[index].name
    }
}

const selectGirl = new SelectGirl([
    {name: 'mike'},
    {name: 'john'},
    {name: 'lucy'}
])
console.log(selectGirl.getGirl(1));